package linker.plugin;

import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPopupMenu;

import linker.account.Account;
import linker.account.ManageAccount;
import linker.list.CellRender;
import linker.list.ListItem;
import linker.list.Model;
import linker.window.WindowSaver;

/**
 * 
 * @version linker 0.93
 * @author Jianfeng jianfeng.linker@gmail.com
 * 
 */
public class PluginItem extends JFrame implements ListItem {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public ImageIcon icon;

	public String fileSeparator = ManageAccount.getFileSeparator();

	public PluginItem(String string) {
		super(string);
	}
	
	public void addStringMessage(String message,JFrame frame){
		Account.addStringMessage(message, frame);
	}

	public void showPluginWindow() {
	}

	public void refresh() {
	}

	public void setPluginDir(String string) {
	}

	public void doubleClick() {
		setVisible(true);
	}

	public ActionListener getActionListener() {
		return null;
	}

	public Model getModelList() {
		return null;
	}

	public JPopupMenu getPopupMenu() {
		return null;
	}

	public void leftClick() {
	}

	public void rightClick() {
	}

	public void setRender(CellRender render) {
		render.setIcon(icon);
	}

	public void create() {
	}

	public void setWindow() {
		setSize(300, 400);
		setLocationRelativeTo(null);
		try {
			WindowSaver.getWindowSaver().loadSettings(this);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
